#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
@date: 2011-11-07
@author: shell.xu
'''
import web
import article, comment

# 参考README的"自动安装说明"部分
def create_urls(baseurl):
    urls = (
        baseurl + '/', article.list_all,
        baseurl + '/user/(.+)', article.list_user,
        baseurl + '/search', article.search,
        baseurl + '/add', article.add,
        baseurl + '/edit/(.+)', article.edit,
        baseurl + '/show/(.+)', article.show,
        baseurl + '/newcmt/(.+)', comment.add,
        )
    web.config.urls['atc_list_byuser'] = baseurl + '/user'
    web.config.urls['atc_search'] = baseurl + '/search'
    web.config.urls['atc_add'] = baseurl + '/add'
    web.config.urls['atc_edit'] = baseurl + '/edit'
    web.config.urls['atc_show'] = baseurl + '/show'
    web.config.urls['cmt_add'] = baseurl + '/newcmt'
    return urls
